﻿using Microsoft.Practices.Prism.Regions;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AddModule.Views
{
    /// <summary>
    /// Interaction logic for AddModuleButton.xaml
    /// </summary>
    [Export]//9. 모든 설정이 완료되면 내보냄.
    [ViewSortHint("08")]//버튼 순서 ... 
    public partial class AddModuleButton : UserControl
    {
        [Import]
        public IRegionManager regionManager;//5.RegionManager추가하고 내보냄

        private static Uri addModuleMainUri = new Uri("AddModuleMainView", UriKind.Relative);//8.내가 등록하고 싶은 View 등록
            
        public AddModuleButton()
        {
            InitializeComponent();
        }

        private void NavigateToContactAddModuleRadioButton_Click(object sender, RoutedEventArgs e)
        {
            regionManager.RequestNavigate("MainContentRegion", addModuleMainUri);//7.버튼 클릭시 navigation에게 view바꿔달라고 요청함.
        }
    }
}
